﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;

namespace Cherry.Agile.Scheduler.Host
{
    public partial class Service : Cherry.Agile.ServiceModel.Services.EnterpriseService
    {
        /// <summary>
        /// Mains the specified args.
        /// </summary>
        /// <param name="args">The args.</param>
        [STAThread]
        static void Main(string[] args)
        {
            var service = new Service();
            service.Start(args);
        }

        protected override void OnStart(string[] args)
        {
            Scheduler.Start();
        }

        protected override void OnStop()
        {
            Scheduler.ShutDown(true);
        }
    }
}
